<?php
require_once('libs/MySmarty.php');
require_once('libs/DbAccess.php');
require_once('classes/site_edit.class.php');

$formPage = new site_edit();

$_action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';

switch($_action) {
    case 'update':
		$formPage->doUpdate($_POST);
		$formPage->initDropDown();
        $formPage->displayForm($_POST);   
        break;
    case 'view':
    default:
        // viewing the guestbook
		$formPage->initDropDown();
        $formPage->displayForm($_POST);   
        break;   
}
?>